﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LaughingDog.GameObjects;
using FarseerGames.FarseerPhysics.Factories;
using LaughingDog.Managers;

namespace LaughingDog.Components
{
    public class EllipseBody : RigidBody
    {
        private const Int32 DEFAULT_RADIUS_X = 10;
        private const Int32 DEFAULT_RADIUS_Y = 10;

        /// <summary>
        /// Creates an instance of a EllipseBody component.
        /// </summary>
        /// <param name="gameObject">The GameObject this Component should be attached to.</param>
        public EllipseBody(GameObject gameObject)
            : base(gameObject)
        {
            mBody = BodyFactory.Instance.CreateEllipseBody(PhysicsManager.Instance.Simulator, GameObject.Transform.ScaledSize.X / 2, GameObject.Transform.ScaledSize.Y / 2, DEFAULT_MASS);
            mBody.Position = GameObject.Transform.Position;
        }
    }
}
